public class ConcreteObserver implements Observer{

    private String name;

    ConcreteObserver(String name) {
        this.name = name;
    }

    @Override
    public void update() {
        // 更新观察者的状态
        System.out.println(name + ": 收到通知，更新状态。");
    }

}
